FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

# 生成Prisma客户端
RUN npx prisma generate

# 暴露3000端口
EXPOSE 3000

# 启动后端服务
CMD ["npm", "run", "start"] 